package com.tpc.control.jpa;

import java.sql.Timestamp;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * Interface for ReserveItemDAO.
 * 
 * @author MyEclipse Persistence Tools
 */

public interface IReserveItemDAO {
	/**
	 * Perform an initial save of a previously unsaved ReserveItem entity. All
	 * subsequent persist actions of this entity should use the #update()
	 * method. This operation must be performed within the a database
	 * transaction context for the entity's data to be permanently saved to the
	 * persistence store, i.e., database. This method uses the
	 * {@link javax.persistence.EntityManager#persist(Object)
	 * EntityManager#persist} operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * IReserveItemDAO.save(entity);
	 * EntityManagerHelper.commit();
	 * </pre>
	 * 
	 * @param entity
	 *            ReserveItem entity to persist
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void save(ReserveItem entity);

	/**
	 * Delete a persistent ReserveItem entity. This operation must be performed
	 * within the a database transaction context for the entity's data to be
	 * permanently deleted from the persistence store, i.e., database. This
	 * method uses the {@link javax.persistence.EntityManager#remove(Object)
	 * EntityManager#delete} operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * IReserveItemDAO.delete(entity);
	 * EntityManagerHelper.commit();
	 * entity = null;
	 * </pre>
	 * 
	 * @param entity
	 *            ReserveItem entity to delete
	 * @throws RuntimeException
	 *             when the operation fails
	 */
	public void delete(ReserveItem entity);

	/**
	 * Persist a previously saved ReserveItem entity and return it or a copy of
	 * it to the sender. A copy of the ReserveItem entity parameter is returned
	 * when the JPA persistence mechanism has not previously been tracking the
	 * updated entity. This operation must be performed within the a database
	 * transaction context for the entity's data to be permanently saved to the
	 * persistence store, i.e., database. This method uses the
	 * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
	 * operation.
	 * 
	 * <pre>
	 * EntityManagerHelper.beginTransaction();
	 * entity = IReserveItemDAO.update(entity);
	 * EntityManagerHelper.commit();
	 * </pre>
	 * 
	 * @param entity
	 *            ReserveItem entity to update
	 * @return ReserveItem the persisted ReserveItem entity instance, may not be
	 *         the same
	 * @throws RuntimeException
	 *             if the operation fails
	 */
	public ReserveItem update(ReserveItem entity);

	public ReserveItem findById(ReserveItemId id);

	/**
	 * Find all ReserveItem entities with a specific property value.
	 * 
	 * @param propertyName
	 *            the name of the ReserveItem property to query
	 * @param value
	 *            the property value to match
	 * @return List<ReserveItem> found by query
	 */
	public List<ReserveItem> findByProperty(String propertyName, Object value);

	public List<ReserveItem> findByMaterialNo(Object materialNo);

	public List<ReserveItem> findByMaterialDesign(Object materialDesign);

	public List<ReserveItem> findByDivision(Object division);

	public List<ReserveItem> findByReserveQty(Object reserveQty);

	public List<ReserveItem> findByUom(Object uom);

	public List<ReserveItem> findByStatus(Object status);

	public List<ReserveItem> findByCreateBy(Object createBy);

	public List<ReserveItem> findByChangeBy(Object changeBy);

	public List<ReserveItem> findByConfirmLabRemark(Object confirmLabRemark);

	public List<ReserveItem> findBySummaryCostingRemark(
			Object summaryCostingRemark);

	public List<ReserveItem> findByLabChangeBy(Object labChangeBy);

	public List<ReserveItem> findByReceiveRawMaterialRemark(
			Object receiveRawMaterialRemark);

	public List<ReserveItem> findByRawChangeBy(Object rawChangeBy);

	public List<ReserveItem> findByGreigeFinishMachine(
			Object greigeFinishMachine);

	public List<ReserveItem> findByGreigeFinishRemark(Object greigeFinishRemark);

	public List<ReserveItem> findByGreigeChangeBy(Object greigeChangeBy);

	public List<ReserveItem> findByDyeingFinishMachine(
			Object dyeingFinishMachine);

	public List<ReserveItem> findByDyeingFinishRemark(Object dyeingFinishRemark);

	public List<ReserveItem> findByDyeingChangeBy(Object dyeingChangeBy);

	/**
	 * Find all ReserveItem entities.
	 * 
	 * @return List<ReserveItem> all ReserveItem entities
	 */
	public List<ReserveItem> findAll();
}